<?php

class Application_Form_Car extends Application_Form_Vehicle
{
	public function __construct($options = null)
    {
        parent::__construct($options);
		$this->setName('car');
		

			
		
		
		$energyChoice = array('1' => 'Diesel', '2' => 'Gas');
		$energy = new Zend_Form_Element_Select('energy');
		$energy->setLabel('Energy:');
		$energy->addMultiOptions(array('-1' => 'Choice:')+$energyChoice);
		$energy->class = 'energy';
		$energy->addValidator(new Zend_Validate_Between(array('min' => 1, 'max' => 2)))
		->addErrorMessage('You need to select one value');
		
		$transmissionChoice = array('1' => 'Manual', '2' => 'Automatic');
		$transmission = new Zend_Form_Element_Select('transmission');
		$transmission->setLabel('Transmission:')
		->addMultiOptions(array('-1' => 'Choice:')+$transmissionChoice);
		$transmission->class = 'transmission';
		$transmission->addValidator(new Zend_Validate_Between(array('min' => 1, 'max' => 2)))
		->addErrorMessage('You need to select one value');


		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setAttrib('id', 'submitbutton')
		->setLabel('Add');

		$elements = array( $energy, $transmission, $submit);
		$this->addElements($elements);

		$this->setDecorators( array( array('ViewScript', array('viewScript' => 'forms/loginform.phtml'))));
	}
}